package com.qingfeng.util;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author zhangyuefei
 * @version 1.0
 * @date 2019/11/22 4:35 下午
 */
@ApiModel("返回结果类型")
@Data
public class ApiMsg<T> {

    @ApiModelProperty(value = "返回结果code,200表示成功，其他表示失败")
    private Integer code;
    @ApiModelProperty(value = "返回结果提示信息")
    private String message;
    @ApiModelProperty(value = "返回结果数据")
    private T data;

    public ApiMsg(Integer code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }
}
